<template>
  <div>
    <button @click="show = !show">Toggle</button>
    <TheSlot>
      <p v-if="show">Child text</p>
    </TheSlot>
  </div>
</template>
<script>
import TheSlot from './TheSlot.vue';

export default {
  components: {
    TheSlot
  },
  data() {
    return {
      show: false
    }
  }
}
//https://stackoverflow.com/questions/58029373/only-show-slot-if-it-has-content-when-slot-has-no-name?rq=3
</script>